<!--///////////////////////////////////////////////////////////////////////
//                                                                       //
//   Switchy! Chrome Proxy Manager and Switcher                          //
//   Copyright (c) 2009 Mohammad Hejazi (mohammadhi at gmail d0t com)    //
//   Dual licensed under the MIT and GPL licenses.                       //
//                                                                       //
////////////////////////////////////////////////////////////////////////-->

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<link rel="stylesheet" href="assets/styles/popup.css" type="text/css">
	<script src="assets/scripts/popup.js" type="text/javascript"></script>
	<script>
		quickSwitchProxy();
	</script>
	<script src="assets/libs/jquery-1.4.min.js" type="text/javascript"></script>
</head>
<body onload="init()" i18n-values=".style.direction:global_direction;.style.textAlign:global_textAlign">
	<div id="menu">
		<div id="directConnection" name="[Direct Connection]" class="item proxy" title="Disable Proxy" 
			i18n-values="title:proxy_directConnection_help">
			<div class="icon"></div><span i18n-content="proxy_directConnection">Direct Connection</span>
		</div>
		<div id="separatorProxies" class="separator"></div>
		<div id="proxies">
			<div class="templateItem" title="">
				<div class="icon"></div><span>Proxy</span>
			</div>
		</div>
		<div id="separatorRules" class="separator"></div>
		<div id="automaticMode" class="item proxy" title="Automatically choose the proper proxy profile &#13;for each URL, based on Switch Rules."
			i18n-values="title:popup_autoSwitchMode_help">
			<div class="icon"></div><span i18n-content="popup_autoSwitchMode">Auto Switch Mode</span>
		</div>
    <div id="systemProxy" name="[System Proxy]" class="item proxy" title="Use System Proxy (need restart)"
      i18n-values="title:proxy_systemProxy_help">
      <div class="icon"></div><span i18n-content="proxy_systemProxy">System Proxy</span>
    </div>
		<div id="menuAddRule" class="item" onclick="showAddRule();" title="Quickly add a new Switch Rule &#13;for the current website."
			i18n-values="title:popup_newRule_help">
			<img src="assets/images/filter-add.png" /><span i18n-content="popup_newRule">New Rule</span>
		</div>
		<div id="separatorOptions" class="separator"></div>
		<div id="menuOptions" class="item" onclick="openOptions();">
			<img src="assets/images/options.png" /><span i18n-content="popup_options">Options</span>
		</div>
		<div id="menuAbout" class="item" onclick="showAbout();">
			<img src="assets/images/about.png" /><span i18n-content="popup_aboutSwitchy">About SwitchyPlus</span>
		</div>
	</div>

	<div id="about">
		<div class="close"><img src="assets/images/close.png" /></div>
		<div class="header">
			<table>
				<tr>
					<td><img src="assets/images/icon-128.png" width="70" /></td>
					<td>
						<table class="titleTable">
							<tr><td colspan="2"><div class="title">SwitchyPlus</div></td></tr>
							<tr>
								<td width="1" class="version" i18n-content="popup_version">version</td>
								<td class="version"><span class="versionNumber">1.7.2</span></td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
		</div>
		<div class="body">
			<div id="developer"><div class="name">
				<table>
					<tr>
						<td i18n-content="popup_developedBy">Developed by</td>
						<td> Mhd Hejazi & ayanamist</td>
					</tr>
				</table>
			</div></div>
			<span><img src="assets/images/chrome.png" valign="middle" />
				<a href="" onclick="openExtensionGalleryWebsite();" i18n-content="popup_chromeExtensionGallery">Chrome Extension Gallery</a></span><br />
			<span><img src="assets/images/web.png" valign="middle" /> 
				<a href="" onclick="openMainWebsite();" i18n-content="popup_switchyWebPage">Switchy! web page</a></span><br />
			<span><img src="assets/images/web.png" valign="middle" /> 
				<a href="" onclick="openSupportWebsite();" i18n-content="popup_supportAndBugReports">Support & Bug reports</a></span><br />
		</div>
		<div class="footer">
			<div i18n-content="popup_copyright">Copyright &copy; 2009 Samabox & 2011 ayanamist.<br />Some rights reserved.</div>
		</div>
	</div>
	
	<div id="addRule">
		
		<div class="header title" i18n-content="popup_newRule">New Rule</div>
		<div class="header light">
			<table>
				<tr>
					<th i18n-content="options_ruleName">Rule Name</th>
					<td><input id="txtRuleName" type="text" value="Quick Rule"></td>
				</tr>
				<tr>
					<th><b i18n-content="options_urlPattern">URL Pattern</b></th>
					<td><input id="txtUrlPattern" type="text" class="ltr"></td>
				</tr>
				<tr class="note">
					<th></th>
					<td><div class="invalid" i18n-content="popup_duplicateRules">* There is already a rule for this URL Pattern.</div></td>
				</tr>
				<tr>
					<th i18n-content="options_patternType">Pattern Type</th>
					<td><select id="cmbPatternType">
						<option value="wildcard" i18n-content="options_patternTypeWildcard">Wildcard</option>
						<option value="regexp" i18n-content="options_patternTypeRegExp">RegExp</option>
					</select></td>
				</tr>
				<tr>
					<th i18n-content="options_proxyProfile">Proxy Profile</th>
					<td><select id="cmbProfileId"></select></td>
				</tr>
			</table>
		</div>
		<table class="control">
			<tr>
				<td width="100%"></td>
				<td><button class="button bold" id="btnSave" onclick="addSwitchRule();" i18n-content="popup_add">Add</button></td>
				<td>&nbsp;&nbsp;&nbsp;</td>
				<td><button class="button" id="btnCancel" onclick="closePopup();" i18n-content="popup_cancel">Cancel</button></td>
			</tr>
		</table>
		<br />
		<br />
	</div>
</body>
</html>
